﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Urbania.Utilities;

namespace Urbania.World
{
    public enum TileType
    {
            Road, //0

            Env_Dirt,
            Env_Water,
            Env_Beach,
            Env_Grass,
            Env_Forest,
            Env_Mountains,
            Env_Ice, //7

            Buil_Farm,
            Buil_PowerPlant, //9
            Buil_Factory,
            Buil_Police,
            Buil_FireStation,
            Buil_Hospital,
            Buil_School,
            Buil_CityHall,
            Buil_SmallStore,
            Buil_LargeStore,
            Buil_House,
            Buil_HomelessShelter,
            Buil_Harbor, //20
    }

    public class TileTypeHelperClass
    {
        public static string[] TileTypeNames = { "Road",
                                                   "Farm",
                                                   "Factory",
                                                   "Police",
                                                   "Fire Station",
                                                   "Hospital", //5
                                                   "School",
                                                   //"City Hall",
                                                   "Store",
                                                   "House", //10 
                                                   "Homeless Shelter",
                                                   //"Harbor", 
                                                   "Power Plant" //13
                                               };

        public static int[] TileEnumExchange = {0,8,10,11,12,13,14,16,18,19,9

                                               };
    }
}

    // DO NOT USE
    /*public class TileType
    {
        public static TileType //defines tyle types
            Road_Horiz,
            Road_Vert,
            Road_SlantRight,
            Road_SlantLeft,
            Road_Intersect,

            Env_Dirt,
            Env_Water,
            Env_Beach,
            Env_Grass,
            Env_Forest,
            Env_Mountains,
            Env_Ice,

            Buil_Farm,
            Buil_Factory,
            Buil_Police,
            Buil_FireStation,
            Buil_Hosipital,
            Buil_School,
            Buil_CityHall,
            Buil_SmallStore,
            Buil_LargeStore,
            Buil_House,
            Buil_HomelessShelter,
            Buil_Harbor,
            Buil_PowerPlant;

        public int costMoney; //the tile's monetary cost
        public int costBureauc; //
        public double rateHappiness; //
        public int ratePollution; //the rate at which the tile produces pollution
        public int rateIncome; //the rate of the tile's income
        public double rateFood;
        public string Filename;
        

        public TileType(string filename, int cost, int bureaucPts, int incomeRate, double happinessRate, int pollutionRate, double foodRate) 
        {
            costMoney = cost;
            costBureauc = bureaucPts;
            rateIncome = incomeRate;
            rateHappiness = happinessRate;
            ratePollution = pollutionRate;
            rateFood = foodRate;

            if (filename == "")
            {
                this.Filename = filename;
            }
            else
            {
                //Utilities.Loader.LoadTex("Tiles\\" + filename);
                this.Filename = filename;
            }
        }

        public static void loadTileTypeTextures() 
        {
            // ( imageFilename, cost, bureaucracyPts, incomeRate, happinessRate, pollutionRate, foodRate )
            Road_Horiz = new TileType("", 10, 2, 0, 0, 1, 0);
            Road_Vert = new TileType("", 10, 2, 0, 0, 1, 0);
            Road_SlantRight = new TileType("", 10, 2, 0, 0, 1, 0);
            Road_SlantLeft = new TileType("", 10, 2, 0, 0, 1, 0);
            Road_Intersect = new TileType("", 10, 2, 0, 0, 1, 0);

            Env_Dirt = new TileType("Hexagon", 0, 0, 0, 0, 0, 0);
            Env_Water = new TileType("", 0, 0, 0, 0.1, 0, 0);
            Env_Beach = new TileType("", 100, 0, 0, 1, 0, 0);
            Env_Grass = new TileType("", 5, 0, 0, 0.2, -5, 0);
            Env_Forest = new TileType("", 50, 0, 0, 0.3, -15, 0.1);
            Env_Mountains = new TileType("", 250, 0, 0, 0.2, 0, 0);
            Env_Ice = new TileType("", 0, 0, 0, 0, 0, 0);

            Buil_Farm = new TileType("", 50, 5, 1, 0, 1, 5);
            Buil_Factory = new TileType("Factory", 400, 20, 10, -1, 5, 0);
            Buil_Police = new TileType("", 100, 10, -1, 5, 0, -1);
            Buil_FireStation = new TileType("", 100, 10, -1, 5, 0, -1);
            Buil_Hosipital = new TileType("", 300, 5, 0, 10, 0, -3);
            Buil_School = new TileType("", 300, 30, -2, 2, 0, -5);
            Buil_CityHall = new TileType("", 0, 50, -1, 2, 0, -2);
            Buil_SmallStore = new TileType("", 100, 0, 5, 0, 0, 3);
            Buil_LargeStore = new TileType("", 200, 0, 10, 0, 1, 6);
            Buil_House = new TileType("", 20, 0, 1, 1, 0, -1);
            Buil_HomelessShelter = new TileType("", 60, 15, 1, -0.05, 0, -3);
            Buil_Harbor = new TileType("", 400, 20, 10, 1, 1, 3);
            Buil_PowerPlant = new TileType("", 400, 5, 5, 0, 10, 0);
        } */

